﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Snake.Data
{
    class Food
    {
        private bool[,] _obstacles;
        private int _coordX, _coordY;
        enum State { Default, Eaten };
        private State _st;

        public Food(bool[,] obstacles)
        {
            _obstacles = obstacles;
        }

        public void GenerateCoordinates()
        {
            Random rnd = new Random();
            do
            {
                _coordX = rnd.Next(30);
                _coordY = rnd.Next(30);
            }
            while (_obstacles[_coordX, _coordY] == true);
            _st = State.Default;
        }

        public int GetX
        {
            get { return _coordX; }
        }

        public int GetY
        {
            get { return _coordY; }
        }
    }
}
